/*
 * Copyright (C) 2018 The Holodeck B2B Team, Sander Fieten
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.holodeckb2b.as2.util;

/**
 * Is a placeholder for constants used in the processing of AS2 messages.
 * 
 * @author Sander Fieten (sander at chasquis-consulting.com)
 */
public final class Constants {
    /**
     * Special value for the PMode.MEPBinding parameter to indicate that the AS2 protocol is used in the P-Mode
     */
    public static final String AS2_MEP_BINDING = "http://holodeck-b2b.org/pmode/mepBinding/as2";
    /**
     * The AS2 version supported by this Holodeck B2B extension. Since compression is supported this should be 1.1
     */
    public static final String AS2_VERSION = "1.1";
    /**
     * The MIME type of the AS2 MDN
     */
    public static final String REPORT_MIME_TYPE = "multipart/report";
    /**
     * The address type used by Holodeck B2B when including identifiers in the "Original-Recipient" and
     * "Final-Recipient" headers
     */
    public static final String AS2_ADDRESS_TYPE = "as2";
    /**
     * The MIME type of the MIME part of the MDN that contains the application processable meta-data.
     */
    public static final String MDN_DISPOSITION_MIME_TYPE = "message/disposition-notification";
    /**
     * Name of the HTTP header that is used to request a MDN response to the message
     */
    public static final String MDN_REQUEST_HEADER = "disposition-notification-to";
    /**
     * Name of the HTTP header that is used to specify the URL where an asynchronous receipt should be delivered
     */
    public static final String MDNREQ_REPLY_TO_HEADER = "receipt-delivery-option";
    /**
     * Name of the HTTP header that is used to specify the parameters for signing of the MDN
     */
    public static final String MDNREQ_SIGNING_OPTIONS_HEADER = "disposition-notification-options";
    /**
     * Name of the parameter included in the <i>Disposition-Notification-Options</i> header to indicate whether the
     * signing of the MDN is required or optional and which format should be used for signing.
     */
    public static final String MDNREQ_SIGNATURE_FORMAT = "signed-receipt-protocol";
    /**
     * Name of the parameter included in the <i>Disposition-Notification-Options</i> header that indicate the preferred
     * hashing algorithms.
     */
    public static final String MDNREQ_MIC_ALGORITHMS = "signed-receipt-micalg";
    /**
     * Name of the message processing context property that holds the MIME part contained in the HTTP entity.
     */
    public static final String CTX_MIME_ENVELOPE = "hb2b:as2:mime-env";
    /**
     * Name of the message processing context property that holds the <i>primary</i> MIME part. This is also the MIME part that
     * will be used to calculate the MIC for inclusion in the MDN
     */
    public static final String CTX_MAIN_MIME_PART = "hb2b:as2:primary-mimepart";
    /**
     * Name of the message processing context property that holds the generic AS2 message meta-data
     */
    public static final String CTX_AS2_GENERAL_DATA = "hb2b:as2:general-meta-data";
    /**
     * Name of the message processing context property that holds the AS2 MDN meta-data
     */
    public static final String CTX_AS2_MDN_DATA = "hb2b:as2:mdn-meta-data";
    /**
     * Name of the message processing context property that holds the AS2 MDN reply parameters
     */
    public static final String CTX_AS2_MDN_REQUEST = "hb2b:as2:mdn-reply-params";
    /**
     * Name of the message processing context property that holds the indicator whether the received message was encrypted
     */
    public static final String CTX_WAS_ENCRYPTED = "hb2b:as2:rcvd-um-encrypted";	
	/**
	 * Prefix for MessageIds generated by Holodeck B2B
	 */
    public static final String GENERATED_MSGID_PREFIX = "hb2b-generated::";
}
